#include <iostream>

using namespace std;

void K_th(int,int,int);

int main(void) {
	int count,N,M,K;
	cin >> count;
	while(count != 0) {
		count--;
		cin >> N;
		cin >> M;
		cin >> K;
		K_th(N,M,K);
	}
	return 0;
}

void K_th(int N,int M, int K) {
	int a[M];
	for(int i = 0; i < M; i++) {
		a[i] = i;
	}
	while(K > 0) {
		for(int i = 0; i < M;i++) {
			if(i == (M - 1)) {
				a[i]++;
				K--;
				if(a[i] >= (M + N)) {
					cout << "Impossible";
					return;
				}
				break;
			}
			if(a[i] != (a[i+1] -1)) {
				a[i]++;
				K--;
				break;
			} 
		}
	}
	char out[M + N];
	for(int i = 0; i < M + N ;i++) out[i] = 0;
	for(int i = 0; i < M; i++) {
		out[a[i]] = 1;
	}
	cout << out;
	return;
}